<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>My JSP 'demo.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<script type="text/javascript">
	function submitForm(id) {
		document.getElementById("id").value = id;
		document.getElementById("id").form.submit();
	}
</script>
</head>

<body>
	<s:form action="demo" method="post" name="demo_form" theme="simple">
		<input type="hidden" id="id" name="id" />
		<table border="0" width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td>id</td>
				<td>name</td>
				<td>email</td>
				<td>test</td>
			</tr>
			<s:iterator var="demo" value="#request.demolist">
				<tr>
					<td><s:property value="#demo.id" /></td>
					<td><s:property value="#demo.name" /></td>
					<td><s:property value="#demo.email" /></td>
					<td><a href="#" onclick="submitForm('<s:property value="#demo.id" />');">submit</a></td>
				</tr>
			</s:iterator>
		</table>
		<table border="0" width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td style="text-align: right;"><s:include value="/page/pageinc.jsp"></s:include>
				</td>
			</tr>
		</table>
	</s:form>
</body>
</html>
